<!-- /* Description for file.
 * 寻访记录
 *
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/recruitpositions
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    会兵2011年0706
 * @lastmodified  张海杰2011年0712
 */-->
 <script language="javascript">
var delurl="<?php echo $deleteurl; ?>";
</script>
<script language="javascript">
var editurl="<?php echo $editurl; ?>";
</script>
<script language="javascript">
var addurl="<?php echo $addurl; ?>";
</script>
<script language="javascript">
var data=<?php echo $data; ?>;
</script>
<script language="javascript">
var disbutton=<?php echo $javascript->object($disbutton);?>;
</script>
<script language="javascript">
var title2="<?php echo $title2; ?>";
</script>
<?php echo $javascript->link('jquery-1.4.2');?>
<script language="javascript">
function button(com,grid,url)  
{  
	var ids=$("#flex").getCheckedRows();
	var pids="";
	if(ids.length==0)
	{
		alert("请选择你要删除的项");
		return;
	}
	for(i=0;i<ids.length;i++)
    {
    	pids=pids+ids[i]+"-";
    }
	if(com=="add")
	{
		var prid=$(".prid").val();
		if(ids.length==0)
		{
			alert("请选择");
		}
		else
		{
		 $(".pReload").trigger("click");
		$.ajax({
            type: "post",
            url: url,
            data: {id:pids,
            prid:prid  },
            dataType:"json",
            success: function(data) {
            window.opener.tablereload("增加成功");
            window.close();
			},
            error: function(data) {
				$(".clearckeck").trigger("click");
				$(".pReload").trigger("click");
				$(".notice").html('data.message');
			}
        });
		}
	}
}
</script>
<script type="text/javascript">
var b=[{
	name:'add',
	displayname : '添加',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/add.png',
	bclass : 'add',
	onpress : button,
	display:disbutton.add,
	url:addurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.del
},
{
	name:'delete',
	displayname : '删除',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/delete.png',
	bclass : 'delete',
	onpress : button,
	display:disbutton.del,
	url:delurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.del
},
{
	name:'edit',
	displayname : '更新',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/add.png',
	bclass : 'add',
	onpress : button,
	display:disbutton.edit,
	url:editurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.edit
}];
</script>
<script type="text/javascript">
var ob=<?php echo $ob;?>;
if(ob.length==0)
{
	
}
else
{
	for(i=0;i<ob.length;i++)
	{
		var l=b.length;
		b[l]=ob[i];
	}
}
</script>
<?php
	echo $html->css('flexigrid');
	echo $html->css('start/jquery-ui-1.8.2.custom');
	
	//echo $javascript->link('jquery');
	echo $javascript->link('flexigrid/flexigrid'); 
	echo $javascript->link('addfromvisitorinitajaxinfo');
	echo $javascript->link('industry');
	//echo $javascript->link('DatePicker/WdatePicker');
	echo $javascript->link('jquery-ui-1.8.2.custom.min');
	echo $html->css ( 'vistorlist' );
?>
<script type="text/javascript">
	$(function(){
		$(".datepickerSpan :input").datepicker({
			inline: true
		});
		 $('.datepickerSpan :input').datepicker('option', {dateFormat: "yy-mm-dd"});
		 $('.datepickerSpan :input').datepicker( "option", "closeText", 'X' );
	});
</script>

<!-- 当前位置 -->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Projectmanagements');//一级目录
										   echo '>';echo __('Projectmanagements');//二级目录
										   echo '>';echo __('Candidate Progress Management');//三级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('from project',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->

<!--                                          按钮区域-->
<script type="text/javascript">
$(function(){
		$("#bt_0").click(function () {$(".bt0").click();});
		$("#bt_6").click(function () {$(".bt6").click();});
		$("#bt_8").click(function () {$(".bt8").click();});
		$("#bt_10").click(function () {$(".bt10").click();});
		$("#bt_12").click(function () {$(".bt12").click();});
		$("#bt_14").click(function () {$(".bt14").click();});
		$("#bt_16").click(function () {$(".bt16").click();});
		});
</script>
<div class="buttonbg">
<a style="width:72px;" id="bt_0">添加到进度中</a>
<a style="width:58px;" id="bt_6">Cold Call</a>   <!-- 一个中文字12px宽 a的宽根据按钮内容设 -->
<a style="width:24px;" id="bt_8">删除</a>
<a style="width:48px;" id="bt_10">简历入库</a>
<a style="width:48px;" id="bt_12">发送邮件</a>
<a style="width:48px;" id="bt_14">定制状态</a>
<a style="width:70px;" id="bt_16">导出到excel</a>
</div>
<!--                                         按钮区域--> 

<!-- 查询区域-->
<div class="tabflex">
<fieldset><legend><?php echo __('Visitorrecord')?></legend>
<?php if (count($searchitems)>0)
{
	$j=0;
	echo "<form class='searchform'>";
	for ($i=0;$i<count($searchitems);$i++)
	{
		$item=$searchitems[$i];

		if ($item['type']=="text")
		{
			echo $item['lable']."<input type='text' name='".$item['name']."' class='sitems' id=".$item['id']."/>";
		}
		elseif ($item['type']=="select")
		{
			echo $item['lable']."<select name='".$item['name']."' class='sitems' id=".$item['id'].">";
			foreach ($item['op'] as $k=>$v)
			{
				echo "<option value='$v'>$k</option>";
			}
			echo "</select>";
		}
		elseif ($item['type']=="checkbox")
		{
			echo "<input type='checkbox' name='".$item['name']."' class='sitems' id=".$item['id']. "value=".$item['value']." ></input>".$item['lable'];
		}
		elseif ($item['type']=="date")
		{
			echo $item['lable'];?><span class="datepickerSpan"><input type='text' name="<?php echo $item['name']?>" class='sitems' id="<?php echo $item['id'];?>"/></span>
			
		<?php 
		}
		if ($item['br'])
		{
			echo "<br>";
		}
	}
}
echo "<br><input type='submit' class='searchbutton' value='开始查询'/>";
echo "<input type='reset' class='resetsubmit' value='清空条件'/>";
echo "</form>";
?>
</fieldset>
</div>
<input type="hidden" class="prid" value="<?php echo $prid;?>"></input>
<div class="notice"></div>
<div class="tabflex">
<table id="flex" style="display: none"></table>
</div>



